<script setup>
import {defineProps , defineEmits} from 'vue';
const state = defineProps( {
    count:Number,
    message:String
})

console.log(state.count , state.message)

//接受父类回调方法
const emit = defineEmits(['custom-click'])

setTimeout(()=>{
  //调用
  emit('custom-click', '子组件的数据')
},2000)

</script>

<template>
  <div>
    <h2>09_composition_api_props_emits_child.vue</h2>
    {{count}},{{message}}
  </div>
</template>

<style lang="scss" scoped>

</style>